
public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree=new BinaryTree();
        BinaryTree.TreeNode root=binaryTree.creatTree();
        System.out.println("=========前序===========");
        binaryTree.preOrder(root);
        System.out.println();
        System.out.println("=========中序===========");
        binaryTree.inOrder(root);
        System.out.println();
        System.out.println("=========后序===========");
        binaryTree.postOrder(root);
        System.out.println();
        System.out.println("==========================");
        int size=binaryTree.size(root);
        System.out.println("获取节点的个数：");
        System.out.println(size);

        System.out.println("获取叶子节点的个数：");
        System.out.println(binaryTree.getLeafNode(root));
        System.out.println();
        System.out.println("==========================");
        int m=binaryTree.getLevelNodeCount(root,3);
        System.out.println(m);

        int n=binaryTree.getHeight(root);
        System.out.println(n);

        BinaryTree.TreeNode ret=binaryTree.findVal(root,'F');
        System.out.println(ret.val);
    }

}
